//调用接口配置文件
import { request } from 'config/request'
// 定义接口
//修改
export async function update (params) {
  return request({
    url: `admin/goods/update`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

//新增
export async function create (params) {
  return request({
    url: `admin/goods/create`,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
    data: params
  })
}

export async function getAreaList (params) {
  return request({
    url: 'admin/address/queryAllAddress',
    method: 'GET',
    data: params,
  })
}

export async function labelQueryList (params) {
  return request({
    url: 'admin/label/queryList',
    method: 'POST',
    data: params,
  })
}

//查询3级地址信息
export async function areAddressGet (params) {
  return request({
    url: 'admin/address/queryAllAddress',
    method: 'GET',
    data: params,
    headers: {
      'Content-type': 'application/json',
    }
  })
}

//楼盘列表
export async function houseListGet (params) {
  return request({
    url: 'admin/estate/adminList',
    method: 'POST',
    data: params,
    headers: {
      'Content-type': 'application/json',
    }
  })
}

//户型
export async function gethouseTypeList (params) {
  return request({
    url: 'admin/housetype/list',
    data: params,
    method: 'POST',
    headers: {
      'Content-type': 'application/json'
    },
  })
}
//对公账户
export async function queryAccount (params) {
  return request({
    url: `admin/bankAccount/queryListByProductId/${params.id}`,
    method: 'GET',
    // data: params,
  })
}
//详情
export async function getDetail (params) {
  return request({
    url: `admin/goods/detail?productId=${params.productId}`,
    method: 'POST',
    // data: {},
  })
}


